
#ifndef	_MESSAGEFIRSTLINE_H_
#define	_MESSAGEFIRSTLINE_H_	1


#include "httpcommon.h"


class CReqLine
{
public:
	CReqLine();
	~CReqLine();

	BOOL	SetReqLine(char* firstline, unsigned len);
	
	REQ_METHOD	GetMethod() { return m_Method; }
	HTTP_VER	GetVersion() { return m_Version; }
	char *		GetUri() { return m_Uri; }
	unsigned	GetReqLineLen() { return m_ReqLineLen; }
	
	void	Cleanup();

private:
	REQ_METHOD	m_Method;
	char *		m_Uri;
	HTTP_VER	m_Version;
	unsigned	m_ReqLineLen;
};



class CStatusLine
{
public:
	CStatusLine();
	~CStatusLine();

	BOOL	SetStatusLine(char* firstline, unsigned len);

	STATUS_CODE	GetStatusCode() { return m_SCode; }
	HTTP_VER	GetVersion() { return m_Version; }
	char *		GetRPhase() { return m_RPhase; }
	unsigned	GetStatusLineLen() { return m_StatusLineLen; }

	void	Cleanup();

private:
	STATUS_CODE	m_SCode;	// Status-Code
	char *		m_RPhase;	// Reason-Phase
	HTTP_VER	m_Version;	// Http-Version
	unsigned	m_StatusLineLen;
};


#endif